﻿using Abp;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace AppFramework.MetalialModel
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private readonly AbpBootstrapper bootstrapper;
        private MainWindow window;
        public App()
        {
            bootstrapper = AbpBootstrapper.Create<AbpDomainMaterModel>();
        }

        protected override void OnStartup(StartupEventArgs e)
        {
            bootstrapper.Initialize();
            window = bootstrapper.IocManager.Resolve<MainWindow>();
            window.Show();
            //base.onstartup(e);
        }

        protected override void OnExit(ExitEventArgs e)
        {
            bootstrapper.IocManager.Release(window);
            bootstrapper.Dispose();
            //base.OnExit(e);
        }
    }
}
